<h2>Problem 166</h2>
<div style="color:#666;font-size:80%;">03 November 2007</div><br />
<div class="problem_content">
<p>A 4x4 grid is filled with digits d, 0 <img src='images/symbol_le.gif' width='10' height='12' alt='&le;' border='0' style='vertical-align:middle;' /> d <img src='images/symbol_le.gif' width='10' height='12' alt='&le;' border='0' style='vertical-align:middle;' /> 9.</p>

<p>It can be seen that in the grid</p>

<p style="text-align:center;">
6 3 3 0<br />
5 0 4 3<br />
0 7 1 4<br />
1 2 4 5</p>

<p>the sum of each row and each column has the value 12. Moreover the sum of each diagonal is also 12.</p>

<p>In how many ways can you fill a 4x4 grid with the digits d, 0 <img src='images/symbol_le.gif' width='10' height='12' alt='&le;' border='0' style='vertical-align:middle;' /> d <img src='images/symbol_le.gif' width='10' height='12' alt='&le;' border='0' style='vertical-align:middle;' /> 9 so that each row, each column, and both diagonals have the same sum?</p>
</div><br />
